iter = 0;
x0 = 10;
cond = 0;%标志位
while (cond ~= 1)
    iter = iter + 1;%iter为迭代次数
    fx = sin(x0)*sin(x0) + cos(x0) - x0;
    dfx = sin(2*x0) - sin(x0) -1;
    x0 = x0 -fx/dfx;
    if abs(fx)<1e-8 || iter>100
        cond = 1;
    end
end
disp(iter);
disp(x0);